<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
<base href="<%=basePath%>" />
<title>Home</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript">
	
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		
</script>
<!--// Meta tag Keywords -->
<!-- css files -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css"
	media="all" />
<!-- Bootstrap-Core-CSS -->
<link href="css/styles.css" rel="stylesheet" type="text/css" media="all" />
<!--<link href="css/1.css" rel="stylesheet" type="text/css" media="all" />-->
<!-- Style-CSS -->
<link rel="stylesheet" href="css/font-awesome.css">
<!-- Font-Awesome-Icons-CSS -->
<link rel="stylesheet" href="css/flexslider.css" type="text/css"
	media="screen" property="" />
<!-- Flexslider-CSS -->
<link rel="stylesheet" href="css/team.css" type="text/css"
	media="screen" property="" />
<!-- Team-CSS -->
<link rel="stylesheet" href="css/smoothbox.css" type='text/css'
	media="all" />
<!-- Smoothbox-CSS -->
<link href="css/wickedpicker.css" rel="stylesheet" type='text/css'
	media="all" />
<!-- Time-script-CSS -->
<!-- //css files -->
<!-- online-fonts -->
<!-- 		<link rel="stylesheet" href="css/common.css"/>页面基本样式 -->
<link
	href="http://fonts.googleapis.com/css?family=Playfair+Display:400,400i,700,700i,900,900i"
	rel="stylesheet">
<link
	href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i"
	rel="stylesheet">
<link
	href="http://fonts.googleapis.com/css?family=Oleo+Script:400,700&amp;subset=latin-ext"
	rel="stylesheet">
<!-- //online-fonts -->
<!-- 		滑块验证 -->
<link href="css/user.css" type="text/css" rel="stylesheet" />
<script src="js/login.js"></script>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.hDialog.min.js"></script>
</head>

<body>
<script type="text/javascript">
function addwish(DishId){
	var c_id=$("#cid").val();
	if(c_id==null||c_id=="")
		{alert("请先登录！！");}
	else{
		var wishdata={
				DishId:DishId,
				c_id:c_id
		};
		$.ajax({
			type:"POST",
			data:wishdata,
			url :'menu/addtowish.do',
			error : function(request) {
				alert("请求异常!!!");
			},
			success : function(data) {
				alert("添加成功!");
				window.location.reload();
			}
		});
	}
}
</script>
	<nav class="mobile-menu">
		<ul>
			<li class="active"><a href="#" class="scroll">快捷菜单</a></li>
			<li><a href="#chefs" class="scroll">今日推荐</a></li>
			<li><a href="#gallery" class="scroll">菜单</a></li>
			<li><a href="#contact" class="scroll">联系我们</a></li>
		</ul>
	</nav>
	<!-- banner -->
	<div id="home" class="navv">
		<div class="center-container">
			<div class="banner wthree">
				<div class="container">
					<div class="banner_top">
						<div class="col-md-6 col-sm-4 col-xs-4 logo">
							<h1>
								<a href="menu/recommand.do">客多多</a>
							</h1>
							
						</div>
						<div class="col-md-6 col-sm-8 col-xs-8 w3_menu">
							<div class="col-md-6 col-sm-5 col-xs-5 top-nav-text">
								<a class="page-scroll" href="#myModal2" data-toggle="modal"
									data-hover="LOGIN">商家登录</a>
							</div>

							<c:if test="${custom.c_name==null}">
								<div class="col-md-3 col-sm-4 col-xs-4 top-nav-text">
									<a class="page-scroll" href="#myModal22" data-toggle="modal"
										data-hover="LOGIN">用户登录</a>
								</div>
								<div class="col-md-3 col-sm-4 col-xs-4 top-nav-text">
									<a class="page-scroll" href="#myModal3" data-toggle="modal"
										data-hover="LOGIN">注册</a>
								</div>
								<!-- 								<a href="LoginOut.do">注销</a> -->
							</c:if>
							<c:if test="${custom.c_name!=null}">
								<div >
								<a href="center.jsp">
								<span>
								<c:if test="${custom.c_nick!=null}">
									<h4 style="color:white; position: absolute;left:70%;">${custom.c_nick}</h4>
								</c:if>
								<c:if test="${custom.c_nick==null}">
									<h4 style="color:#fff;position: absolute;left:70%;">未命名_${custom.c_id}</h4>
								</c:if>
								</span>
								<c:if test="${custom.c_img!=null }"><img src="showImg.do?c_name=${custom.c_name }&c_pwd=${custom.c_pwd}" style="position: absolute;left:100%; width: 74px; height: 74px; float: left; border-radius: 50%; border: 5px solid #999; overflow: hidden;"></c:if>
								<c:if test="${custom.c_img==null }"><img src="images/unfind.jpg" style="width: 74px; height: 74px; float: left; border-radius: 50%; border: 5px solid #999; overflow: hidden;"></c:if>
								
								</a>
								<a style="color:#fff;" href="loginOut.do">注销</a>
								</div>
							</c:if>


							<div class="mobile-nav-button">
								<div class="mobile-nav-button__line"></div>
								<div class="mobile-nav-button__line"></div>
								<div class="mobile-nav-button__line"></div>
							</div>
							<!--导航按钮-->

						</div>
						<div class="clearfix"></div>
					</div>

					<div class="clearfix"></div>
					<!-- //form -->
				</div>
			</div>
			<!-- modal -->
			<div class="modal about-modal w3-agileits fade" id="myModal22"
				tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body login-page ">
							<!-- login-page -->
							<div class="login-top sign-top">
								<div class="agileits-login">
									<h5>用户登录</h5>
									<form method="post">
										<input type="text" class="email" name="name" id="name"
											placeholder="用户名" required="required" /> <input type="password"
											class="password" name="pwd" id="pwd" placeholder="密码"
											required="required" />
										<div class="login-box">
											<label class="form-inline">
												<div class="form-inline-font">拖动滑块:</div>
												<div class="form-inline-input">
													<div class="code-box" id="code-box">
														<input type="text" name="code" class="code-input" />
														<p style="color: white;"></p>
														<span>>>></span>
													</div>
												</div>
											</label>
										</div>

										<div class="w3ls-submit">
											<input id="l_submit" type="submit" value="登录"
												onclick="login()" disabled="disabled">
										</div>
									</form>

								</div>
							</div>
						</div>
					</div>
					<!-- //login-page -->
				</div>
			</div>
			<div class="modal about-modal w3-agileits fade" id="myModal2"
				tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body login-page ">
							<!-- login-page -->
							<div class="login-top sign-top">
								<div class="agileits-login">
									<h5>商家登录</h5>
<!-- 									<form action="#" method="post"> -->
										<input type="text" class="email" name="admin_name" id="admin_name"
											placeholder="用户名" required="" /> <input type="password"
											class="password" placeholder="密码" required=""  name="admin_pwd" id="admin_pwd"/>
										<div class="w3ls-submit">
											<input type="submit" onclick="login_admin()" value="LOGIN">
										</div>
<!-- 									</form> -->

								</div>
							</div>
						</div>
					</div>
					<!-- //login-page -->
				</div>
			</div>
			<!--找回密码-->
			<div class="modal about-modal w3-agileits fade" id="myModal4"
				tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body login-page ">
							<!-- login-page -->
							<div class="login-top sign-top">
								<div class="agileits-login">
									<h5>找回密码</h5>
									<form action="#" method="post">
										<input type="text" class="email" name="Email"
											placeholder="用户名" required="" /> <input type="password"
											class="password" name="Password" placeholder="密码" required="" />
										<div class="wthree-text">
											<ul>
												<li><label class="anim"> <input type="checkbox"
														class="checkbox"> <span> 记住密码</span>
												</label></li>
											</ul>
											<div class="clearfix"></div>
										</div>
										<div class="w3ls-submit">
											<input type="submit" value="LOGIN">
										</div>
									</form>

								</div>
							</div>
						</div>
					</div>
					<!-- //login-page -->
				</div>
			</div>
			<!-- //modal -->
			<!-- modal -->
			<div class="modal about-modal w3-agileits fade" id="myModal3"
				tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body login-page ">
							<!-- 注册 -->
							<div class="login-top sign-top">
								<div class="agileits-login">
									<h5>注册</h5>
									<form method="post" id="registForm" name="RegistForm">

										<input type="text" name="c_name" id="c_name" placeholder="用户名"
											required="required" /> <input type="password" name="c_pwd"
											id="c_pwd" placeholder="密码" required="required" /> <input
											type="password" name="c_r_pwd" id="c_r_pwd"
											onkeyup="compare()" placeholder="确认密码" />
										<div id="ts" style="color: red;"></div>
										<div class="wthree-text">
											<ul>
												<li><label class="anim"> <input type="checkbox"
														class="checkbox"> <span> 我接受注册条款</span>
												</label></li>
											</ul>
											<div class="clearfix"></div>
										</div>

										<div class="w3ls-submit">
											<input class="regist" type="button" value="注册"
												onclick="regist()">
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- //login-page -->
				</div>
			</div>
			<!-- //modal -->
		</div>
	</div>
<div class="team" id="chefs">
			<div class="container">
				<div class="agile-heading team-heading">
					<h3 class="w3l-title">今日推荐</h3>
				</div>
				<hr>
				<div class="agile-team-grids">
				   <c:forEach items="${hlist}" var="hl">
					<div class="col-sm-3 team-grid">
						<div class="flip-container">
							<div class="flipper">
								<div class="front" >
									<img src="upimg/${hl.dishPicture }" alt="等待加载~" style="height:330px"/>
								</div>
								<div class="back">
									<h4>${hl.dishName }</h4>						
									<div class="w3l-social">
										<ul>
											<li>
												<a href="menu/showmenuinfo.do?DishId=${hl.dishId }"><i class="fa fa-eye"></i><p>详情</p></a>
												
											</li>
											<li>
												<!--<a href="addCart.do?DishId=${hl.dishId}" >  --><a href="javascript:void(0);" onclick="addcart(${hl.dishId})"><span ><i class="glyphicon glyphicon-shopping-cart" style="width:30px;height:30px"></i></span><p>加入购物车</p></a>							
											</li>
											<li>
												<a><span><i class="fa fa-heart"></i></span><p><input type="button" onclick="addwish(${hl.dishId })" value="收藏" style="width:30px;height:25px;background-color:red"></p>	</a>		
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					</c:forEach>
					
				</div>
			</div>
		</div>
	<input type="hidden" value="${custom.c_id }" id="cid">
	<!-- //team -->
	<div class="delicious_food" id="gallery">
		<div class="container">
			<h3 class="w3l-title">分类</h3>
			<div class="agile_delicious_food_grids">
			
				<div class="agile_delicious_food_grid">
					<a  href="menu/menukind.do?MenuClassid=1">
						<div class="view view-sixth">
							<img src="images/drink.jpg" alt="加载中.." class="img-responsive" style="width:550px;height:260px" />
							<div class="mask">
								<h4>饮品</h4>
								<p>一杯润胃鲜柞果汁，美味（胃）让你心旷神怡</p>
							</div>
						</div>
					</a>
				</div>
				<div class="agile_delicious_food_grid">
					<a href="menu/menukind.do?MenuClassid=3">
						<div class="view view-sixth">
							<img src="images/g7.jpg" alt="加载中.." class="img-responsive" style="width:550px;height:260px" />
							<div class="mask">
								<h4>中餐</h4>
								<p>各地招牌，让你吃出家的感觉</p>
							</div>
						</div>
					</a>
				</div>
				<div class="agile_delicious_food_grid">
					<a  href="menu/menukind.do?MenuClassid=2">
						<div class="view view-sixth">
							<img src="images/g1.jpg" alt="加载中.." class="img-responsive" style="width:550px;height:260px"/>
							<div class="mask">
								<h4>西餐</h4>
								<p>综合各地美食元素，让你的胃畅游世界</p>
							</div>
						</div>
					</a>
				</div>
				
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
	<!-- menu-section -->
	<div class="menu-w3l" id="menu">
		<h3 class="w3l-title">菜单</h3>
		<ul id="flexiselDemo1">
		 <c:forEach items="${mlist }" var="ml">
			<li>
				<div class="w3layouts_banner_bottom_left">
				<a href="menu/showmenuinfo.do?DishId=${ml.dishId }">
					<img src="upimg/${ml.dishPicture }" alt="加载中.. " class="img-responsive" style="width:360px;height:260px" />
					<h4>
						${ml.dishName } --- <span>￥：${ml.dishPrice }元/份</span>
					</h4>
					<p>${ml.menuClassname }</p>
				</a>
				</div>
			</li>
			</c:forEach>	
		</ul>
	</div>
<hr>
	<div class="cuisine-names">
		<div class="w3_cuisine_names_left w3l_cuisine_names_left">
		<h2 style="color:red;font-family:微软雅黑;font-weight:bold;">菜品</h2>
		<br>
		    <c:forEach items="${elist }" var="el">
		    <a href="menu/showmenuinfo.do?DishId=${el.dishId }">
			<h3>
				${el.dishName } ----- <span>￥：${el.dishPrice }元/份</span><span style="color:blue;font-family:微软雅黑;font-weight:bold;">(${el.menuClassname })</span>
			</h3>
			</a>
			</c:forEach>
		</div>
		<div class="w3ls_cuisine_names_left">
			<img src="images/pri.png" alt=" " class="img-responsive" />
		</div>
		
		<div class="w3_cuisine_names_left">
		<h2 style="color:red;font-family:微软雅黑;font-weight:bold;">饮品</h2>
		<br>
		<c:forEach items="${dlist }" var="dl">
		<a href="menu/showmenuinfo.do?DishId=${dl.dishId }">
			<h3>
				${dl.dishName } ----- <span>￥：${dl.dishPrice }元/份</span>
			</h3>			
		</a>
			</c:forEach>
		</div>
		<div class="clearfix"></div>
	</div>
	<div class="footer" id="contact">
		<div class="container">
			<div class="agile-footer-grids">
				<div class="col-md-3 col-sm-3 col-xs-3 w3-agile-footer-grid">
					<div class="logo-2">
						<h2>
							<a href="index.jsp"><img src="images/logo.jpg" alt="加载中.." style="width:100px;height:80px"><span>美食餐厅</span></a>
						</h2>
					</div>
					<c:forEach items="${rlist }" var="rl">
					<ul style="color:white;font-size:25px">
						<li>我家地址：</li>
						<li>${rl.RAddress }</li>
						<li>联系方式：</li>	
						<li>${rl.RTel }</li>					
					</ul>
					</c:forEach>
				</div>
				<div class="col-md-3 col-sm-6 col-xs-6 w3-agile-footer-grid">
					<h3>开放时间</h3>
					<div class="col-md-5 col-sm-5 col-xs-5 agile-opening">
						<ul>
							<li>周一</li>
							<li>周二</li>
							<li>周三</li>
							<li>周四</li>
							<li>周五</li>
							<li>周六</li>
							<li>周日</li>
						</ul>
					</div>
					<div class="col-md-3 col-sm-3 col-xs-3 agile-opening">
						<ul>
							<li>8am-10pm</li>
							<li>8am-10pm</li>
							<li>8am-11pm</li>
							<li>6am-11pm</li>
							<li>6am-12pm</li>
							<li>6am-12pm</li>
							<li>6am-12pm</li>
						</ul>
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="col-md-6 w3-agile-footer-grid grid-w3-1">
					<div class="contact-block-left">
					<h3>餐厅特色</h3>	
					<br>
					<h4 style="color:white">中西结合</h4><br>
					<h4 style="color:white">顶级大厨</h4><br>
					<h4 style="color:white">免费配送</h4><br>	
					<h4 style="color:white">食物美味</h4>			
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
	
	<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.js"></script>
	<!-- Necessary-JavaScript-File-For-Bootstrap -->

	<script src="js/responsiveslides.min.js"></script>
	<script>
		// You can also use "$(window).load(function() {"
		$(function() {
			// Slideshow 4
			$("#slider3").responsiveSlides({
				auto : true,
				pager : true,
				nav : false,
				speed : 500,
				namespace : "callbacks",
				before : function() {
					$('.events').append("<li>before event fired.</li>");
				},
				after : function() {
					$('.events').append("<li>after event fired.</li>");
				}
			});

		});
	</script>
	<!-- //responsiveslider -->
	<!-- menu -->
	<script>
		$(document)
				.ready(
						function() {
							$('.mobile-nav-button')
									.on(
											'click',
											function() {
												$(
														".mobile-nav-button .mobile-nav-button__line:nth-of-type(1)")
														.toggleClass(
																"mobile-nav-button__line--1");
												$(
														".mobile-nav-button .mobile-nav-button__line:nth-of-type(2)")
														.toggleClass(
																"mobile-nav-button__line--2");
												$(
														".mobile-nav-button .mobile-nav-button__line:nth-of-type(3)")
														.toggleClass(
																"mobile-nav-button__line--3");

												$('.mobile-menu').toggleClass(
														'mobile-menu--open');
												return false;
											});
						});
	</script>
	<!-- //menu -->
	<!-- flexSlider-for-grids-section -->
	<script defer src="js/jquery.flexslider.js"></script>
	<script type="text/javascript">
		$(window).load(function() {
			$('.flexslider').flexslider({
				animation : "slide",
				start : function(slider) {
					$('body').removeClass('loading');
				}
			});
		});
	</script>
	<!-- //flexSlider-for-grids-section -->
	<!-- flexSlider-for-menu-section -->
	<script type="text/javascript">
		$(window).load(function() {
			$("#flexiselDemo1").flexisel({
				visibleItems : 4,
				animationSpeed : 1000,
				autoPlay : true,
				autoPlaySpeed : 3000,
				pauseOnHover : true,
				enableResponsiveBreakpoints : true,
				responsiveBreakpoints : {
					portrait : {
						changePoint : 480,
						visibleItems : 2
					},
					landscape : {
						changePoint : 640,
						visibleItems : 3
					},
					tablet : {
						changePoint : 768,
						visibleItems : 4
					}
				}
			});

		});
	</script>
	<script type="text/javascript" src="js/jquery.flexisel.js"></script>
	<!-- //flexSlider-for-menu-section -->
	<!-- start-smoth-scrolling -->
	<script type="text/javascript" src="js/move-top.js"></script>
	<script type="text/javascript" src="js/easing.js"></script>
	<script type="text/javascript">
		jQuery(document).ready(function($) {
			$(".scroll").click(function(event) {
				event.preventDefault();
				$('html,body').animate({
					scrollTop : $(this.hash).offset().top
				}, 1000);
			});
		});
	</script>
	<!-- start-smoth-scrolling -->
	<!-- for-bottom-to-top smooth scrolling -->
	<script type="text/javascript">
		$(document).ready(function() {
			/*
				var defaults = {
				containerID: 'toTop', // fading element id
				containerHoverID: 'toTopHover', // fading element hover id
				scrollSpeed: 1200,
				easingType: 'linear' 
				};
			 */
			$().UItoTop({
				easingType : 'easeOutQuart'
			});
		});
	</script>
	<a href="#" id="toTop" style="display: block;"> <span
		id="toTopHover" style="opacity: 1;"> </span></a>
	<!-- //for-bottom-to-top smooth scrolling -->
	<!-- Calendar -->
	<link rel="stylesheet" href="css/jquery-ui.css" />
	<script src="js/jquery-ui.js"></script>
	<script>
		$(function() {
			$("#datepicker,#datepicker1,#datepicker2,#datepicker3")
					.datepicker();
		});
	</script>
	<!-- //Calendar -->
	<!-- video-js -->
	<script src="js/jquery.vide.min.js"></script>
	<!-- //video-js -->
	<!-- smoothbox -->
	<script type="text/javascript" src="js/smoothbox.jquery2.js"></script>
	<!-- //smoothbox -->
	<!-- Time -->
	<script type="text/javascript" src="js/wickedpicker.js"></script>
	<script type="text/javascript">
		$('.timepicker').wickedpicker({
			twentyFour : false
		});
		
		function addcart(dishId) {
			var c_id=$("#cid").val();
			if(c_id==null||c_id=="")
				{alert("请先登录！！");}
			else{
				var intMonth,intDay,intHours,intMinutes;
				var today;
				today=new Date();
				intMonth=today.getMonth()+1;
				intDay=today.getDate();
				intHours=today.getHours();
				intMinutes=today.getMinutes();
				window.location.href="addCart.do?cart_id="+intMonth+intDay+intHours+intMinutes+"&DishId="+dishId;
				}
			
			
		}

	</script>
	<!-- //Time -->
	<script type="text/javascript" src="js/index.js"></script>
	<!-- //js-scripts -->
</body>

</html>
